package fu.abc.DAO;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DAOconnection {
	private static String forName = "sun.jdbc.odbc.JdbcOdbcDriver";
	private static String url = "jdbc:odbc:Project_web";
	static Connection connect = null;
	
	public static Connection getConnection () throws SQLException{
		try {
			Class.forName(forName);
			connect = DriverManager.getConnection(url);
			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return connect;	
		
	}
	public void close(){
		try {
			connect.close();
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
